﻿<%@ Page Language="C#" MasterPageFile="~/Masterpage/User.master" AutoEventWireup="true"
    CodeFile="privatedishlist.aspx.cs" Inherits="User_privatedishlist" Title="SundayWish - 个人食谱" %>

<asp:Content ID="Content2" ContentPlaceHolderID="pagecontent" runat="Server">
    <div class="dishdetailleft">
        <div class="page_head">
            <div>
                <span class="page_head_span">您共收藏了<span id="dishnumber" runat="server" style="color: #f00"></span>个食谱|
                    <a href="adddish.aspx">添加食谱</a></span>
            </div>
        </div>
        <div class="page_searchbar">
        </div>
        <div class="page_content">
            <br />
            <asp:GridView ID="gvPlanlist" runat="server" PageSize="8" AllowPaging="true" AutoGenerateColumns="False"
                ShowHeader="False" BorderStyle="None" BorderWidth="0px" GridLines="None" Width="100%"
                OnRowCommand="GridView1_RowCommand">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <div class="dishitem">
                                <div style="float: left; width: 30%">
                                    <div class="box">
                                        <asp:Image ID="img" runat="server" ImageUrl='<%# "~/image/s"+Eval("DishImage") %>' />
                                    </div>
                                </div>
                                <div class="dishcontent">
                                    <div class="dishname">
                                        <%# Eval("DishName")%></div>
                                    <table style="margin-top: 10px">
                                        <tr>
                                            <td height="25px">
                                                分类：<%# Eval("DishKind")%>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="25px">
                                                原材料：<%# Eval("DishMaterial")%>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height="25px">
                                                使用次数：<%# Eval("DishCount")%>次
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <div style="float: left; width: 30%">
                                    <table style="margin-top: 40px">
                                        <tr>
                                            <td style="width: 150px">
                                                <asp:Button ID="btnDetail" runat="server" Text="查看详情" CommandName="btnDetail" CommandArgument='<%#Eval("DishId") %>'  CssClass="buttona"/>
                                                <br />
                                                <br />
                                                <asp:Button ID="btnAddToPlan" runat="server" Text="加入食谱计划" CommandName="btnAddToPlan" CssClass="buttona"
                                                    CommandArgument='<%#Eval("DishId") %>' />
                                            </td>
                                            <td>
                                                <asp:Button ID="btnEdit" runat="server" Text="修改食谱" CommandName="editData" CommandArgument='<%#Eval("DishId") %>'  CssClass="buttona"/>
                                                <br />
                                                <br />
                                                <asp:Button ID="btnDelete" runat="server" Text="删除食谱" OnClientClick='if(confirm("您确定删除吗?"))return true;else return false;'
                                                    CommandName="delData" CommandArgument='<%#Eval("DishId") %>' CssClass="buttona" />
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </div>
    </div>
    <div class="dishdetailright">
     <div class="dishdetailrighthead">
            <div style="float: left; line-height: 25px; height: 25px;">
                <asp:label ID="lbdate" runat="server">尚未选择食谱计划</asp:label></div>
            <div style="float: right; line-height: 25px; height: 25px;">
                <asp:label ID="lbweek" runat="server"></asp:label></div>
        </div>
        <div class="dishdetailrighttable">
            <asp:GridView ID="gvCurrentPlan" runat="server" PageSize="8" AllowPaging="true" AutoGenerateColumns="False"
                ShowHeader="False" BorderStyle="None" BorderWidth="0px" GridLines="None" Width="100%" OnRowCommand="current_RowCommand">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                        <div class="rightplanlist"><%# Eval("DishName")%><div style="float:right">
                            <asp:ImageButton ID="ImageButton1" runat="server" OnClientClick='if(confirm("您确定删除吗?"))return true;else return false;'  ImageUrl="~/image/web/cancel.png" CommandName="delData" CommandArgument='<%#Eval("DishId") %>'/></div></div>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <div style="float:right; margin-top:5px">
                <asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl="~/User/plan/planlist.aspx" CssClass="otherplan">选择其他计划</asp:LinkButton></div>
        </div>
    </div>
</asp:Content>
